package StudyCode.summary.zipfile;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ReadFileUsingFileInputStream {
	public static void main(String[] args) {

		File file = new File("E:/Copy/2.txt");
		int ch;
		StringBuffer strContent = new StringBuffer("");
		FileInputStream fin = null;

		try {
			fin = new FileInputStream(file);
			while ((ch = fin.read()) != -1)
				strContent.append((char) ch);
			fin.close();
		} catch (IOException ioe) {
			ioe.printStackTrace();
		}

		System.out.println("文件内容 :");
		System.out.println(strContent);
	}
}
